import App from './App'
// #ifndef VUE3
import Vue from 'vue'
import './uni.promisify.adaptor'
import uView from '@/uni_modules/uview-ui'
import userLogin from "./components/userLogin/index"
import {BaseUrl} from "./utils/staticResource"
import store from '@/store/store.js'
Vue.config.productionTip = false
App.mpType = 'app'
Vue.use(uView)
import utils from "./utils/index.js"
import route from './utils/function/route.js'
const $u = {
	route: route,
}

Vue.component("userLogin", userLogin);

Vue.prototype.$u = $u;
Vue.prototype.$toast = utils.showToast;

Vue.prototype.$baseImgUrl = 'https://fomoclub.top/resource/static/'
Vue.prototype.$baseImgUrl2 = 'static/'
// Vue.prototype.$baseUrl = 'https://fomoclub.top/prod-api/'
Vue.prototype.$baseUrl = BaseUrl
Vue.prototype.$videoUrl = 'https://fomoclub.top/resource'
Vue.prototype.doSomeSthingByLogin = utils.doSomeSthingByLogin

Vue.prototype.getnav = function(url) {
	if(url == "") return uni.$u.toast("敬请期待");
	uni.navigateTo({
		url: url,
	});
};
const app = new Vue({
	...App,
	store
})
app.$mount()
export { app };
// #endif

// #ifdef VUE3
import {
	createSSRApp
} from 'vue'
import {BaseUrl} from "@/utils/staticResource";
export function createApp() {
	const app = createSSRApp(App)
	return {
		app
	}
}
// #endif
